﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using YiSha.Util;

namespace YiSha.Model.Result.QixingManage
{
    /// <summary>
    /// 订单详情数据源
    /// </summary>
    public class OrderDetailDto
    {
        /// <summary>
        /// 订单详情id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long Id { get; set; }

        /// <summary>
        /// 商品id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long goods_id { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string goods_name { get; set; }
        /// <summary>
        /// 商品封面
        /// </summary>
        public string goods_image { get; set; }
        /// <summary>
        /// 商品状态
        /// </summary>
        public int publish_status { get; set; }

        public float? goods_price { get; set; }

        public string publish_status_doc { get; set; }
        /// <summary>
        /// 订单id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long order_id { get; set; }
        ///// <summary>
        ///// 货品id
        ///// </summary>
        //[JsonConverter(typeof(StringJsonConverter))]
        //public long pw_id { get; set; }


        public string productids { get; set; }
        /// <summary>
        /// 商铺id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long shop_id { get; set; }
        /// <summary>
        /// 商铺名称
        /// </summary>
        public string shop_name { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long order_sn { get; set; }

        public string ordernumber { get; set; }

        /// <summary>
        /// 购买数量
        /// </summary>
        public int product_cnt { get; set; }
        /// <summary>
        /// 订单来源
        /// </summary>
        public int source_type { get; set; }

        public string source_type_doc { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public int order_type { get; set; }

        public string order_type_doc { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public int order_status { get; set; }

        public string order_status_doc { get; set; }
        /// <summary>
        /// 收货时间
        /// </summary>
        public DateTime? receive_time { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? pay_time { get; set; }
        /// <summary>
        /// 发货时间
        /// </summary>
        public DateTime? shipping_time { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        public DateTime? create_time { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        public float payment_money { get; set; }
        /// <summary>
        /// 订单金额
        /// </summary>
        public float order_money { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public int payment_method { get; set; }

        public string payment_method_doc { get; set; }

        /// <summary>
        /// 收货人
        /// </summary>
        public string shipping_user { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ship_mobile { get; set; }

        /// <summary>
        /// 省
        /// </summary>
        public string province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string district { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string address { get; set; }

        public string VIN { get; set; }

        /// <summary>
        /// 车集合
        /// </summary>
        List<goodscar> cars { get; set; }=new List<goodscar>();

        /// <summary>
        /// 货品名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 货品颜色
        /// </summary>
        public string color { get; set; }

        [JsonConverter(typeof(StringJsonConverter))]
        public long? colorid { get; set; }

        public string remark { get; set; }

        public string delivery_sn { get; set; }

        public string delivery_company { get; set; }

        public float member_price { get; set; }

        [JsonConverter(typeof(StringJsonConverter))]
        public long skuid { get; set; }

        public string skuname { get; set; }

        public decimal discount { get; set; }

        public int goods_cnt { get; set; }
    }


    public class OrderDto
    {
        /// <summary>
        /// 订单主表id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long Id { get; set; }


        /// <summary>
        /// 订单号
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long order_sn { get; set; }

        public string ordernumber { get; set; }

        /// <summary>
        /// 购买数量
        /// </summary>
        public int product_cnt { get; set; }
        /// <summary>
        /// 订单来源
        /// </summary>
        public int source_type { get; set; }

        public string source_type_doc { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public int order_type { get; set; }

        public string order_type_doc { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public int order_status { get; set; }

        public string order_status_doc { get; set; }
        /// <summary>
        /// 收货时间
        /// </summary>
        public DateTime? receive_time { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? pay_time { get; set; }
        /// <summary>
        /// 发货时间
        /// </summary>
        public DateTime? shipping_time { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        public DateTime? create_time { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        public float payment_money { get; set; }
        /// <summary>
        /// 订单金额
        /// </summary>
        public float order_money { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public int payment_method { get; set; }

        public string payment_method_doc { get; set; }

        /// <summary>
        /// 收货人
        /// </summary>
        public string shipping_user { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ship_mobile { get; set; }

        /// <summary>
        /// 省
        /// </summary>
        public string province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string district { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string address { get; set; }

        public string remark { get; set; }
    }


    /// <summary>
    /// 订单详情数据源
    /// </summary>
    public class StoreOrderDto
    {
        /// <summary>
        /// 订单住id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long Id { get; set; }
        
        /// <summary>
        /// 订单号
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long order_sn { get; set; }

        public string ordernumber { get; set; }

        /// <summary>
        /// 购买数量
        /// </summary>
        public int product_cnt { get; set; }
        /// <summary>
        /// 订单来源
        /// </summary>
        public int source_type { get; set; }

        public string source_type_doc { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public int order_type { get; set; }

        public string order_type_doc { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public int order_status { get; set; }

        public string order_status_doc { get; set; }
        /// <summary>
        /// 收货时间
        /// </summary>
        public DateTime? receive_time { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? pay_time { get; set; }
        /// <summary>
        /// 发货时间
        /// </summary>
        public DateTime? shipping_time { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        public DateTime? create_time { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        public float payment_money { get; set; }
        /// <summary>
        /// 订单金额
        /// </summary>
        public float order_money { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public int payment_method { get; set; }

        public string payment_method_doc { get; set; }

        /// <summary>
        /// 收货人
        /// </summary>
        public string shipping_user { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ship_mobile { get; set; }

        /// <summary>
        /// 省
        /// </summary>
        public string province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string district { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string address { get; set; }

        public string remark { get; set; }
    }

    public class goodscar
    {
        /// <summary>
        /// 货品id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long pw_id { get; set; }
        /// <summary>
        /// 货品规格型号
        /// </summary>
        public string model { get; set; }
        /// <summary>
        /// 货品名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 货品颜色
        /// </summary>
        public string color { get; set; }

        [JsonConverter(typeof(StringJsonConverter))]
        public long? colorid { get; set; }

        public string VIN { get; set; }

        public string VINName { get; set; }
    }
}
